home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / MacTCP Library 1.1 / Library / LowLevel ƒ / Headers ƒ / MacTCPExtras.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-04  |  1.6 KB  |  66 lines  |  [TEXT/SPM ]

  1. /*
  2.     MacTCPExtras.h
  3.     
  4.     Header file for all of the little "extras" which are included in the library,
  5.     but are scattered throughout the source.
  6.     
  7.     01/18/94 dn - Created
  8.     01/30/94 dn - Added PBControl calls.
  9. */
  10.  
  11. #pragma once
  12.  
  13. #ifndef __H_MacTCPExtras__
  14. #define __H_MacTCPExtras__
  15.  
  16. #include <OSUtils.h>
  17. #include <Files.h>
  18.  
  19. // error codes
  20. enum {
  21.     extrasBaseErr=23200,            // the base for the extras
  22.     nilParmBlkPtr                    // the ParmBlkPtr was nil.
  23.     
  24. };
  25.  
  26. #define __H_LibTraps__
  27.  
  28. #define TrapMask 0x0800
  29.  
  30. typedef TCPiopb* TCPiopbPtr;
  31. typedef UDPiopb* UDPiopbPtr;
  32. typedef struct ICMPParamBlock ICMPParamBlock,* ICMPParamBlockPtr;
  33. typedef ip_addrbytes IPAddr;
  34.  
  35. /*
  36.     The Prototypes
  37. */
  38.  
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42.  
  43. // String/Memory Stuff
  44. short StrLen(char* string);                            // return a string's len
  45. void MemSet(char* mem,char ch,long size);                // set memory to a value
  46. StringPtr MyC2PStr(char* cstr);                        // Convert C --> Pascal string
  47. char* MyP2CStr(StringPtr pstr);                        // Convert Pascal --> C string
  48.  
  49. // PBControl Stuff
  50. OSErr SyncAsync(ParmBlkPtr pb,Boolean async);            // do a sync/async call
  51.  
  52. // DNR Folder extras
  53. OSErr GetSystemFolder(short* vref,long* dirID);            // find the system folder
  54. OSErr GetCPanelFolder(short* vref,long* dirID);            // find the control panels folder
  55.  
  56. // Trap extras
  57. short NumToolboxTraps(void);                            // returns the number of traps in the system
  58. TrapType GetTrapType(short theTrap);                    // returns the trap type of a given trap
  59. Boolean TrapAvailable(short theTrap);                    // determines whether a trap is available
  60.  
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64.  
  65. #endif /* __H_MacTCPExtras__ */
  66.